<?php

namespace app\common\validate;

use think\Validate;

class Wdocument extends Validate
{
    protected $rule = [
        'title' => 'require|length:2,100',
        'content' => 'require',

       
        'status' => 'require|in:normal,hidden',
        
    ];
    
    protected $message = [
        'title.require' => '标题不能为空',
        'title.length' => '标题长度必须在2-100个字符之间',
        'content.require' => '内容不能为空',

       
        'status.in' => '状态值不正确',
        
    ];
    
    protected $scene = [
        'add' => ['title', 'content' ],
        'edit' => ['title', 'content']
    ];
}